<div class="fixed-bar">
    <form class="layui-form layui-form-pane fixed-bar-form" action="{:url()}" method="get" id="hisi-table-search">
    <div class="layui-form-item">
    	<label class="layui-form-label">搜索</label>
        <div class="layui-input-inline">
            <input type="text" name="keyword" lay-verify="required" placeholder="输入关键字，按回车搜索" class="layui-input">
        </div>
    </div>
    <div class="layui-inline layui-upload">
        <input type="hidden" name="stat_type">
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">搜索</button>
        <button type="button" class="layui-btn layui-btn-primary hisi-export">导出</button>
        <span class="clear-search"></span>

    </div>
    </form>
</div>

<table id="dataTable"></table>

{include file="system@block/layui" /}

<script type="text/html" id="picTpl">
    <img src="{{ d.ori_pic }}" class="lay-pic">
</script>

<script type="text/html" id="updateTimeTpl">
    <div>{{layui.util.toDateString(d.update_time * 1000) }}</div>
</script>

<script type="text/javascript">
    layui.use(['table','tool'], function() {
        var table = layui.table;
        table.render({
            elem: '#dataTable'
            ,url: '{:url()}' //数据接口
            ,page: true //开启分页
            ,skin: 'row'
            ,even: true
            ,limit: 20
            ,limits: [20,50,100,150,200]
            ,text: {
                none : '暂无相关数据'
            }
            ,toolbar: '#toolbar'
            ,defaultToolbar: ['filter', 'exports', 'print']
            ,cols: [[ //表头
                {field: 'id', title: '编号', sort: true}
                ,{field: 'pic', title: '图片',templet:'#picTpl'}
                ,{field: 'sku', title: 'SKU',width:200,templet:function(d){return '<span class="copy-item">'+d.sku+'</span>'}}
                ,{field: 'chewei_price', title: '车位价'}
                ,{field: 'sixian_price', title: '打边价'}
                ,{field: 'zhuanji_price', title: '冚车价'}
                ,{field: 'process', title: '工艺'}
                ,{field: 'update_time', title: '更新时间',templet:function(d){return layui.util.toDateString(d.update_time * 1000)}}
            ]]
        });
    });
</script>